package com.yfp.device.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yfp.device.domain.OrderDetailWait;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 *
 * @description 针对表【order_detail_wait(订单预计排队时间)】的数据库操作Mapper
 * @createDate 2024-09-03 11:52:23
 * @Entity com.yfp.org.domain.entity.OrderDetailWait
 */
public interface OrderDetailWaitMapper extends BaseMapper<OrderDetailWait> {

    /**
     * 根据machineId和orderDetailId查询订单预计排队时间
     *
     * @param machineId
     * @param orderDetailIds
     * @return
     */
    List<OrderDetailWait> selectByMachineIdAndOrderDetailId(@Param("machineId") String machineId, @Param("orderDetailIds") List<String> orderDetailIds);

    /**
     * 根据machineId和orderDetailId更新订单预计排队时间
     *
     * @param orderDetailWait
     */
    void updateByMachineIdAndOrderDetailId(OrderDetailWait orderDetailWait);

    /**
     * 批量插入订单预计排队时间
     *
     * @param orderDetailWaits
     */
    void insertBatch(@Param("orderDetailWaits") List<OrderDetailWait> orderDetailWaits);
    /**
     * 根据订单详情查询
     * @param orderDetailId
     * @return
     */
    OrderDetailWait findByOrderDetailId(String orderDetailId);

    /**
     * 修改状态
     * @param orderDetailId
     * @param status
     */
    void updateStatusByOrderDetailId(@Param("orderDetailId") String orderDetailId,@Param("status") Integer status);
}




